/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>Project: smvc2022 - ExceptionController
 * <p>Powered by webrx On 2022-04-08 11:51:47
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */

@ControllerAdvice
public class ExceptionController {
    @ExceptionHandler @ResponseBody
    public String ex(Exception e) {
        return e.getMessage();
    }
}
